<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 校区管理
 */
class Campus extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = '*';

    /**
     * 列表
     * @return void
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function lst()
    {
        $model = new \app\common\model\Campus();
            $this->auth->getUser()['campus_id'] ?? 0;
        $data = $model
            ->where("status", 1)
            ->order("weigh", "desc")
            ->select();
        $this->success("列表", $data);
    }
}